<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>AddUser</title>
</head>
<body>
<h1>UpdateUser</h1>
<hr>
<div th:include="commons/topBar :: topBar"></div>

<form th:action="@{/user/updateUser}" method="post">
    <div>
        <label for="">用户名</label>
        <!--disabled:提交之后不能获取到值，readonly：提交之后可以获取到值-->
        <input type="text" name="username" th:value="${user.getUsername()}" readonly>
    </div>

    <div>
        <label for="">密码</label>
        <input type="password" name="password" th:value="${user.getPassword()}">
    </div>

    <div>
        <label for="">角色</label>
        <select name="role" id="">
            <option value="0" selected>普通用户</option>
            <option value="1">普通管理员</option>
        </select>
    </div>

    <div>
        <label for="">注册时间</label>
        <input type="text" th:value="${#dates.format(user.getRegtime(), 'yyyy-MM-dd HH:mm:ss')}" disabled>
    </div>


    <input type="submit" value="修改"><br>


</form>
</body>
</html>